package com.uidp.domain;

import com.acsior.dac.exeption.DataAccessException;
import com.acsior.sbc.exception.BusinessException;
import com.acsior.sbc.exception.ValidationException;
import com.acsior.sbc.impl.hibernate.HibernateBusinessObject;
import com.uidp.hibernatelayer.GroupsDAO;
import com.uidp.hibernatelayer.GroupsVO;

public class Groups extends HibernateBusinessObject<GroupsVO, GroupsDAO> {
	
	private ModulElements modulElements;
	private String uniqname;

	public Groups() throws BusinessException {
		super();
	}

	public Groups(GroupsVO h) throws BusinessException {
		super(h);
	}

	@Override
	protected void setValues(GroupsVO h) throws DataAccessException {
		h.setUniqname(getUniqname());
		h.setModulElements(getModulElements().findData());

	}

	@Override
	protected void copyProperties(GroupsVO d, boolean deepCopy)
			throws BusinessException {
		setUniqname(d.getUniqname());
		setModulElements(new ModulElements(d.getModulElements()));

	}

	@Override
	protected void validate() throws ValidationException {
		// TODO Auto-generated method stub

	}

	/** @see PersistentObject#initialize() */
	@Override
	protected void initialize() throws BusinessException {
		super.initialize();
		this.modulElements = new ModulElements();
	}

	@Override
	protected Class<GroupsDAO> getDAOClass() {
		return GroupsDAO.class;
	}

	public ModulElements getModulElements() {
		return modulElements;
	}

	public void setModulElements(ModulElements modulElements) {
		this.modulElements = modulElements;
	}
	public String getUniqname() {
		return uniqname;
	}

	public void setUniqname(String uniqname) {
		this.uniqname = uniqname;
	}


	

}
